<!DOCTYPE html>
<html>
<head>
<title>账号设置 - {config[webname]} - {config[webtitle]}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{config[keyword]}">
<script type="text/javascript" src="js/jquery-ui-1.8.16/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<link rel="stylesheet" type="text/css" href="styles/common.css" />
<link rel="stylesheet" type="text/css" href="styles/table.css" />
<style>
.div2-left{
	width:160px;
	padding-top:20px;
}
#my{
	font-size:14px;
	padding:5px;
	text-align:center;
}
#nav ul li{
	border-bottom:1px solid #dddddd;
}
#nav ul li a{
	display:block;
	font-size:14px;
	text-align:center;
	color:blue;
	padding:5px 0px;
	text-decoration:none;
}
#nav ul li a:hover,#nav ul li.selected,#nav ul li.selected a{
	background-color:#79C5E9;
	color:white;
}
.div2-right{
	padding:10px;
	width:720px;
}
#div-profile label{
	width:80px;
}

#div-profile .f1_field input,#div-profile .f1_field textarea{
	width:300px;
}
#div-pwd label{
	width:120px;
}
#div-pwd .f1_field input,#div-pwd .f1_field textarea{
	width:300px;
}
#div-avatar #avatar_set{
	width:450px;
	float:left;
}
#div-avatar #avatar_set label{
	width:80px;
}
#div-avatar #avatar_now{
	width:200px;
	float:left;
	margin:20px 0px;
	padding-left:20px;
	border-left:1px solid #6FBCEA;
}
#div-avatar #avatar_now p{
	font-size:14px;
	padding-bottom:5px;
}
#div-weibo .weibo:hover{
	background-color:#f5f5f5;
}
#div-weibo .weibo{
	border-top:1px solid #efefef;
	border-bottom:1px solid #efefef;
	padding:10px 5px;
	margin:0px 20px;
	font-size:14px;
}
#div-weibo .weibo-info{
	border-top:1px solid #efefef;
	border-bottom:1px solid #efefef;
	padding:10px 5px;
	margin:0px 20px;
	font-size:14px;
}
#div-weibo .weibo .name{
	width:350px;
}
#div-weibo .weibo .status{
	width:200px;
}
#div-weibo .weibo .opt{
	width:100px;
	text-align:right;
}
</style>
</head>
<body class="div2-body">
<!--#include file="header.html"-->
<div class="div2-main">
	<div class="div2-left">
		<div id="my">帐号设置</div>
		<div id="nav">
			<ul>
				<li id="nav_profile"<!-- if($nav=='profile') --> class="selected"<!-- end -->><a href="account.php?nav=profile">更新资料</a></li>
				<li id="nav_avatar"<!-- if($nav=='avatar') --> class="selected"<!-- end -->><a href="account.php?nav=avatar">设置头像</a></li>
				<li id="nav_pwd"<!-- if($nav=='pwd') --> class="selected"<!-- end -->><a href="account.php?nav=pwd">修改密码</a></li>
				<li id="nav_oauth"<!-- if($nav=='oauth') --> class="selected"<!-- end -->><a href="account.php?nav=oauth">微博同步</a></li>
			</ul>
		</div>
	</div>
	<div class="div2-right" style="background-color:#fff;height:500px">
	
		<!-- if($nav=='profile') -->
		<div id="div-profile">
		<form action="account.php?nav=profile" method="post">
		<div class="f1">
			<div class="f1_header">基本资料</div>
			<div class="f1_subheader">更新您的基本资料<!-- if($profile_update) --><b style="color:green;margin-left:10px;font-size:14px;">资料更新成功！</b><!-- end --></div>
			<div class="f1_content">
				<div class="f1_row">
					<label>邮箱</label>
					<span class="f1_field"><input name="mail" value="{user_email}"></span>
					<!-- if($err[e_email]) --><span class="f1_error">{err[e_email]}</span><!-- end -->
				</div>
				<div class="f1_row">
					<label>昵称</label>
					<span class="f1_field"><input name="name" value="{user_name}"></span>
					<!-- if($err[e_name]) --><span class="f1_error">{err[e_name]}</span><!-- end -->
				</div>
				<div class="f1_row">
					<label>网站</label>
					<span class="f1_field"><input name="website" value="{user_website}"></span>
					<!-- if($err[e_website]) --><span class="f1_error">{err[e_website]}</span><!-- else --><span class="f1_hint">http(s)://&nbsp;开头</span><!-- end -->
				</div>
				<div class="f1_row">
					<label style="vertical-align:top">自我介绍</label>
					<span class="f1_field"><textarea name="mydesc">{user_mydesc}</textarea></span>
					<!-- if($err[e_mydesc]) --><span class="f1_error" style="vertical-align:top">{err[e_mydesc]}</span><!-- else --><span class="f1_hint" style="vertical-align:top">不超过70个字</span><!-- end -->
				</div>
				<div class="f1_row">
					<label></label>
					<span class="f1_btn"><input class="btn" type="submit" name="r" value="更新"></span>
				</div>
			</div>
		</div>
		</form>
		</div>
		<!-- end -->
		
		<!-- if($nav=='avatar') -->
		<div id="div-avatar">
		<form action="account.php?nav=avatar" method="post" enctype="multipart/form-data">
		<div class="f1" id="avatar_set">
			<div class="f1_header">设置</div>
			<div class="f1_subheader">设置您的头像<!-- if($avatar_update) --><b style="color:green;margin-left:10px;font-size:14px;">头像设置成功！</b><!-- end -->
			</div>
			<div class="f1_content">
				<div class="f1_row">
					<label>选择头像</label>
					<span class="f1_field"><input name="avatarfile" type="file" value="{_POST[avatarfile]}"></span><!-- if($err) --><span class="f1_error">{err}</span><!-- end -->
				</div>
				<div class="f1_row" style="padding-top:0px;padding-bottom:15px;">
					<label style="vertical-align:top">要求</label><span class="f1_hint" style="height:auto">1. 请选择.png .jpeg .gif格式的图片文件<br>2. 像素需大于100×100<br>2. 图片大小不得超过8MB</span>
				</div>
				<div class="f1_row">
					<label></label>
					<span class="f1_btn"><input class="btn" type="submit" name="r" value="上传"></span>
				</div>
			</div>
		</div>
		<div id="avatar_now">
			<p>您当前的头像</p>
			<img src="avatar.php?<!-- if($user[avatar_fid]) -->fid={user[avatar_fid]}<!-- else -->default<!-- end -->" style="width:150px;border: 1px solid #efefef;padding:5px;">
		</div>
		</form>
		</div>
		<!-- end -->
		
		<!-- if($nav=='pwd') -->
		<div id="div-pwd">
		<form action="account.php?nav=pwd" method="post">
		<div class="f1">
			<div class="f1_header">修改密码</div>
			<div class="f1_subheader">修改您的密码<!-- if($pwd_update) --><b style="color:green;margin-left:10px;font-size:14px;">密码修改成功！</b><!-- end --></div>
			<div class="f1_content">
				<div class="f1_row">
					<label>当前密码</label>
					<span class="f1_field"><input name="pwd" type="password" value="{user_pwd}"></span>
					<!-- if($e_pwd) --><span class="f1_error">{e_pwd}</span><!-- end -->
				</div>
				<div class="f1_row">
					<label>新密码</label>
					<span class="f1_field"><input name="newpwd" type="password" value="{user_newpwd}"></span>
					<!-- if($e_newpwd) --><span class="f1_error">{e_newpwd}</span><!-- else --><span class="f1_hint">6到40位</span><!-- end -->
				</div>
				<div class="f1_row">
					<label>再次输入新密码</label>
					<span class="f1_field"><input name="newpwd2" type="password" value="{user_newpwd2}"></span>
					<!-- if($e_newpwd2) --><span class="f1_error">{e_newpwd2}</span><!-- end -->
				</div>
				<div class="f1_row">
					<label></label>
					<span class="f1_btn"><input class="btn" type="submit" name="r" value="修改"></span>
				</div>
			</div>
		</div>
		</form>
		</div>
		<!-- end -->
		
		<!-- if($nav=='oauth') -->
		<div id="div-weibo">
			<p style="padding:10px;font-size:20px">同步您的微博，将您发布的资源同步分享到您的微博！</p>
			<p style="color:red">{err}</p>
			<div class="weibo">
				<span class="name">腾讯微博</span>
				<!-- if($oauth_tencent) -->
				<span class="status">已同步（@{oauth_tencent[nickname]}）</span>
				<span class="opt"><a href="account.php?nav=oauth&disconnect=tencent">取消同步</a></span>
				<!-- else -->
				<span class="status">未同步</span>
				<span class="opt"><a href="account.php?nav=oauth&connect=tencent">立即同步</a></span>
				<!-- end -->
			</div>
		</div>
		<!-- end -->
	</div>
	<br style="clear:both">
</div>
</body>
</html>